// noinspection NpmUsedModulesInstalled,JSUnusedGlobalSymbols
import request from '@/utils/request'

export default {
  // 修改
  updateHyperlink(hyperlink) {
    return request({
      url: '/itservice/hyperlinkadmin/update',
      method: 'post',
      data: hyperlink
    })
  },

  // 添加
  addHyperlink(hyperlink) {
    return request({
      url: '/itservice/hyperlinkadmin/addHyperlink',
      method: 'post',
      data: hyperlink
    })
  },

  // 删除
  removeHyperlinkById(id) {
    return request({
      url: `/itservice/hyperlinkadmin/removeHyperlinkById/${id}`,
      method: 'delete'
    })
  },

  // 分页查看
  getPageHyperlink(page, limit) {
    return request({
      url: `/itservice/hyperlinkadmin/pageHyperlink/${page}/${limit}`,
      method: 'get'
    })
  },

  // 根据id查看hyperlink信息
  getHyperlinkInfoById(hyperlinkId) {
    return request({
      url: `/itservice/hyperlinkadmin/getHyperlinkById/${hyperlinkId}`,
      method: 'get'
    })
  },

  // 关键字搜索
  searchHyperlink(keyword) {
    return request({
      url: `/itservice/hyperlinkadmin/searchHyperlink/${keyword}`,
      method: 'get'
    })
  },

  // 批量删除
  batchDelete(ids) {
    return request({
      url: `/itservice/hyperlinkadmin/batchDelete`,
      method: 'delete',
      data: ids
    })
  },

  // 更改轮播图状态
  changeState(hyperlinkId) {
    return request({
      url: `/itservice/hyperlinkadmin/changeState/${hyperlinkId}`,
      method: 'get'
    })
  },

  //8 一键更改视频状态
  batchChangeHyperlinkState(state) {
    return request({
      url: `/itservice/hyperlinkadmin/batchChangeHyperlinkState/${state}`,
      method: 'get'
    })
  }
}
